<?php if (!defined("_ECRIRE_INC_VERSION")) return;
/**
 * Aloha Cart
 *
 * @author     Aleksey Yaroshchuk (aleksey.yaroshchuk@gmail.com)
 * @license    GNU/GPL
 * @package    plugins
 * @subpackage alohacart
 * @copyright  (c) Aleksey Yaroshchuk 2011-2012
 * @link       http://www.spip-contrib.net/AlohaCart
 */
include_spip('functions/pdk_common');

function balise_ALOHACART_EXTENSION_DATA($p) {
	return calculer_balise_dynamique($p,'ALOHACART_EXTENSION_DATA', array());
}

function balise_ALOHACART_EXTENSION_DATA_stat($args, $filtres) {    
	return $args;
}

function balise_ALOHACART_EXTENSION_DATA_dyn($id_extension, $options = array()) {
    $extension_mdl = pdk_load_class('AlohacartExtensionModel','classes/');
    $extension = $extension_mdl->GetExtensionClassByID($id_extension);
    
	if (!$options['id_order'] && _request('id_order'))
		$options['id_order'] = _request('id_order');    
	
	if (!_request('id_order') && $options['id_order'])
		set_request('id_order', $options['id_order']);
        
    $data = $extension->GetData($options); 
    
    return array('balise/alohacart_extension_data', 0, array('data'=>$data));
}

?>